Refactore PropagateToMuon and add propagation to L3 muon filters at HLT#37180
Refactore PropagateToMuon and add propagation to L3 muon filters at HLT#37180cmsbuild merged 2 commits intocms-sw:masterfrom
Conversation
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37180/28748
|
|
A new Pull Request was created by @JanFSchulte (Jan-Frederik Schulte) for master. It involves the following packages:
@Martin-Grunewald, @rekovic, @epalencia, @emanueleusai, @ahmad3213, @cmsbuild, @missirol, @jfernan2, @pmandrik, @santocch, @cecilecaillol, @pbo0, @rvenditti can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
| process.load("TrackPropagation.SteppingHelixPropagator.SteppingHelixPropagatorAny_cfi") | ||
| process.load("TrackPropagation.SteppingHelixPropagator.SteppingHelixPropagatorAlong_cfi") | ||
| process.load("TrackPropagation.SteppingHelixPropagator.SteppingHelixPropagatorOpposite_cfi") | ||
| return process |
There was a problem hiding this comment.
Why is loading all these needed? Are these for various possible options but only one is used in the end?
There was a problem hiding this comment.
The HLT menu already contains:
process.SteppingHelixPropagatorAny = cms.ESProducer( "SteppingHelixPropagatorESProducer",
process.hltESPFastSteppingHelixPropagatorAny = cms.ESProducer( "SteppingHelixPropagatorESProducer",
process.hltESPFastSteppingHelixPropagatorOpposite = cms.ESProducer( "SteppingHelixPropagatorESProducer",
process.hltESPSteppingHelixPropagatorAlong = cms.ESProducer( "SteppingHelixPropagatorESProducer",
process.hltESPSteppingHelixPropagatorOpposite = cms.ESProducer( "SteppingHelixPropagatorESProducer",
There was a problem hiding this comment.
Perhaps some cleanup and rationalisation is needed!
There was a problem hiding this comment.
I did make the label if the propagators configurable so the ones already in the menu can be used.
There is indeed some logic that chooses the propagator that is used in the code:
cmssw/MuonAnalysis/MuonAssociators/src/PropagateToMuonCore.cc
Lines 148 to 162 in 23e7243
From what I can see, only the Along and Opposite are actually being used, so the Any could in principle be left out.
|
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37180/28763
Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37180/28764
|
|
Pull request #37180 was updated. @Martin-Grunewald, @rekovic, @epalencia, @emanueleusai, @ahmad3213, @cmsbuild, @missirol, @jfernan2, @pmandrik, @santocch, @cecilecaillol, @pbo0, @rvenditti can you please check and sign again. |
|
I should note that without this customization, the tests will fail because HLT crashes: https://github.com/cms-sw/cmssw/pull/37180/files#diff-8fc23ee531566af47b6eff1b354bb3db1c4e8f3925413edc3632e417d168b75fR158 |
missirol
left a comment
There was a problem hiding this comment.
Here's a first look from my side.
| Support for other muon stations will be added on request. | ||
|
|
||
| \class PropagateToMuonCore PropagateToMuonCore.h | ||
| "HLTriggerOffline/Muon/interface/PropagateToMuonCore.h" \brief Propagate an |
There was a problem hiding this comment.
| "HLTriggerOffline/Muon/interface/PropagateToMuonCore.h" \brief Propagate an | |
| \brief Propagate an |
| public: | ||
| explicit PropagateToMuon(const edm::ParameterSet &iConfig, edm::ConsumesCollector); | ||
| ~PropagateToMuon(); | ||
| //This is a nearly identical copy to MuonAnalysis/MuonAssociators/interface/PropagateToMuonCore.h |
There was a problem hiding this comment.
I'm not sure I understand this comment. Isn't this file the same that contains the comment?
There was a problem hiding this comment.
There is a nearly identical copy of the PropagateToMuon class, for reasons I don't know, in HLTrigger/Offline, and I somewhat randomly used that one as the starting point for the refactoring, hence the leftover comment. I removed it.
| object (usually a track) to the second muon station. Support for other muon | ||
| stations will be added on request. | ||
|
|
||
| \author Giovanni Petrucciani |
There was a problem hiding this comment.
I would either remove the name(s) altogether, or add your name too to signal that the class has been reworked.
| #ifndef HLTriggerOffline_Muon_interface_trackStateEnums_h | ||
| #define HLTriggerOffline_Muon_interface_trackStateEnums_h |
| Chi2MeasurementEstimator estimator(1e10, | ||
| 3.); // require compatibility at 3 sigma |
There was a problem hiding this comment.
| Chi2MeasurementEstimator estimator(1e10, | |
| 3.); // require compatibility at 3 sigma | |
| // require compatibility at 3 sigma | |
| Chi2MeasurementEstimator estimator(1e10, 3.); |
Avoid wierd break by code-format by moving comment above line.
| filter.propagatorAny = cms.ESInputTag("", "SteppingHelixPropagatorAny") | ||
| filter.propagatorOpposite = cms.ESInputTag("", "hltESPSteppingHelixPropagatorOpposite") | ||
|
|
||
| return process |
There was a problem hiding this comment.
customizeFor37180 also needs to be called inside customizeHLTforCMSSW (the latter contains examples).
| trigger::TriggerFilterObjectWithRefs& filterproduct) const override; | ||
|
|
||
| private: | ||
| mutable PropagateToMuonInterface propInt_; |
There was a problem hiding this comment.
| mutable PropagateToMuonInterface propInt_; | |
| const PropagateToMuonInterface propInt_; |
I didn't see the need to use mutable anymore (here and in other similar places). No?
There was a problem hiding this comment.
True, that was an oversight, fixed.
| desc.add<bool>("useSimpleGeometry", true); | ||
| desc.add<bool>("useStation2", true); | ||
| desc.add<string>("useTrack", "tracker"); | ||
| desc.add<string>("useState", "atVertex"); | ||
| desc.add<edm::ESInputTag>("propagatorAlong", edm::ESInputTag("", "hltESPSteppingHelixPropagatorAlong")); | ||
| desc.add<edm::ESInputTag>("propagatorAny", edm::ESInputTag("", "SteppingHelixPropagatorAny")); | ||
| desc.add<edm::ESInputTag>("propagatorOpposite", edm::ESInputTag("", "hltESPSteppingHelixPropagatorOpposite")); |
There was a problem hiding this comment.
To factorise better, this is probably a good candidate for PropagateToMuonInterface::fillPSetDescription, so the lines here would become a single call to that static function (there are various examples of fillPSetDescription in CMSSW).
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37180/28787
|
|
I won't get around to resolving the duplication immediately, so I'll create an issue for the moment. |
|
please test |
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37180/28921
|
|
Pull request #37180 was updated. @rekovic, @epalencia, @emanueleusai, @ahmad3213, @Martin-Grunewald, @missirol, @jfernan2, @pmandrik, @santocch, @cecilecaillol, @pbo0, @rvenditti can you please check and sign again. |
|
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-9dc230/23256/summary.html Comparison Summary@slava77 comparisons for the following workflows were not done due to missing matrix map:
Summary:
|
|
+1
|
|
merge |
|
+hlt @JanFSchulte , please open the backport PR to 12_3_X. |
|
+1 |
|
+1 |
Follow-up to #37086, adding the propagation of the L3 muon trajectory to the second muon station for the L3-L1 matching in a handful of HLT filters.
Out of the suggestions made by @makortel in that PR to improve the code, I opted to refactor the PropagateToMuon class into two classes.
We re-checked the HLT timing and as before we do not observe a significant change when we add the propgation (compare blue and black):

In terms of rates, no significant change is observed for higher-pt muon triggers, such as IsoMu24. Changes are observed for low-pT muon triggers, especially the Bs->mumu trigger HLT_DoubleMu4_3_Bs_v14, which goes from ~15 to ~22 Hz. We observe that the HLT efficiency for Bs->mumu candidates passing the analysis selection improves from ~75% to ~90%, so a good deal of the rate increase is coming from genuine Bs that BPH needs for analysis.
Full rate results are here: https://jschulte.web.cern.ch/jschulte/rates/
fyi @missirol @khaosmos93